import java.awt.*;

import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

public class GUI {

    private static void createAndShowGUI() {

    	JFrame frame = new JFrame("Fluppsch");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setPreferredSize(new Dimension(400, 600));
        
        JScrollPane scrollPane = new JScrollPane();
        frame.add(scrollPane);
        
        
        JPanel contentPane = new JPanel();
        scrollPane.add(contentPane);
        scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane.setViewportView(contentPane);
        
        contentPane.setLayout(new GridLayout(1, 2));
        
        JPanel pane1=new JPanel();
        JPanel pane2=new JPanel();
        
        pane1.setLayout(new GridLayout(100, 1));
        pane2.setLayout(new GridLayout(100, 1));
        
        contentPane.add(pane1);
        contentPane.add(pane2);
        
        for(int i=0; i<100; i++) {
        	pane1.add(new JButton("pane1" + i));
        	pane2.add(new JButton("pane2" + i));
        }
        
        frame.pack();
        frame.setVisible(true);
    }

    public static void main(String[] args) {
    	
    	try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		} catch (UnsupportedLookAndFeelException e) {
			e.printStackTrace();
		}
		
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
            }
        });
    }
}